package com.lupan.tomcatStudy.springCode.applicationContext;

import org.springframework.beans.BeansException;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 说明：
 *
 * @author lupan
 * @version 2017/6/15 13:57
 */
public class MyAppContext extends ClassPathXmlApplicationContext {

    public MyAppContext(String... configLocations) throws BeansException {
        super(configLocations);
    }

    /**
     *  覆盖父类方法，自定义启动验证
     */
    @Override
    protected void initPropertySources(){
        getEnvironment().setRequiredProperties("var");
    }
}
